package com.wy.dao;

import com.wy.model.sys.Residence;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ResidenceMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Residence record);

    int insertSelective(Residence record);

    Residence selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Residence record);

    int updateByPrimaryKeyWithBLOBs(Residence record);

    int updateByPrimaryKey(Residence record);

    int deleteResidences(@Param("groupId") List<String> groupId);

    public List<Residence> residenceList(@Param("pageSize") Integer pageSize, @Param("start") Integer start, @Param("projectName") String projectName,@Param("rids") List<String> rids);

    public Integer residenceSize(@Param("pageSize") Integer pageSize, @Param("start") Integer start,@Param("projectName") String projectName,@Param("rids") List<String> rids);

    public List<Residence> getAllResidence();

    public List<Residence> getResidence(@Param("rids") List<String> rids);

    List<Residence> getResidenceByUserId(@Param("userId") Integer uid);

    List<Residence> getResidenceByName(@Param("projectName") String name);

    void insertBatch(List<Residence> list);

    List<Residence> selectByName(List<Residence> list);

    public Residence getResidenceByHouseId(@Param("houseId") Integer houseId);
}